package com.senocular.xml {

	/**
	 * XMLDefinitionFilter instances are used with the create method
	 * of the XMLDefinition class.  Instances of XMLDefinitionFilter
	 * define for an object type used in XMLDefinition.create() what 
	 * properties are included or excluded from the resulting XML or
	 * what properties should be marked as a definition property. These
	 * properties are defined in an object passed to the constructor
	 * of a new XMLDefinitionFilter instance.  Using the defaultType
	 * parameter, you can also dictate what the default property
	 * behavior is.  Property types include INCLUDE, EXCLUDE, and
	 * PROPERTY and are saved as static constants within this class.
	 */
	public class XMLDefinitionFilter {
		
		/**
		 * Value for indicating that an object's property
		 * should be included in generated definition XML.
		 */
		public static const INCLUDE:String = "include";
		/**
		 * Value for indicating that an object's property
		 * should be excluded from generated definition XML.
		 */
		public static const EXCLUDE:String = "exclude";
		/**
		 * Value for indicating that an object's property
		 * should be defined as definition property in XML.
		 */
		public static const PROPERTY:String = "property";
		
		// class properties are only accessible
		// from definitions within this package
		internal var qualifiedClassName:String;
		internal var properties:Object;
		internal var defaultType:Object;
		
		/**
		 * Constructor; creates a new XMLDefinitionFilter.
		 * @param qualifiedClassName The fully qualifiedClassName class name
		 * 		of the object type being filtered.  This is in the form of
		 * 		PackagePath::ClassName or the string returned by 
		 * 		getQualifiedClassName().
		 * @param properties A generic object of the type Object with 
		 * 		properties relating to the target type's properties.  The
		 * 		value of those properties within this object determine if the
		 * 		property is included, excluded, or defined as a property in
		 * 		the XML generated by XMLDefinition.create().
		 * @param defaultType The default filter type for properties not
		 * 		referenced in the properties object.  By default this is
		 * 		XMLDefinitionFilter.INCLUDE.
		 */
		public function XMLDefinitionFilter(qualifiedClassName:String, properties:Object, defaultType:String = INCLUDE) {
			this.qualifiedClassName = qualifiedClassName;
			this.properties = properties;
			this.defaultType = defaultType;
		}
	}
}